#ifndef __mid_can_h__
#define __mid_can_h__

#include "types.h"
#include "CanTypes.h"
#include "can_Cfg.h"
//#include "can0Com.h"
//#include "can1Com.h"


extern void  ConfigCanidFilter(uint8_t instance,flexcan_id_table_t* dataInfo);




extern can_state_t * g_canStatePtr[CAN_INSTANCE_COUNT];
extern void Can_CanBusOffParaInit0(void);
extern void Can_CanBusOffParaInit1(void);

extern void Can_CanBusOffTimeCnt(void);
extern void mid_can_Init(uint8_t instance, can_state_t *state, const can_user_config_t *data);
extern void mid_can_Deinit(uint8_t instance);

extern void mid_CanWakeUp(uint8_t instance);
extern void mid_CanSleep( uint8_t instance );
extern Enum_Result_t mid_canRxIndication( uint8_t instance );
extern Enum_Result_t mid_canTxService( uint8_t instance );
extern Enum_Result_t  mid_canWrite(uint8_t instance, const struct_canMsg_t *canMsg);
extern void mid_can_busOffProc10ms(uint8_t instance);
extern void mid_canTimeout1ms(uint8_t instance);

extern uint8_t CANBusDtcStatus(uint8_t instance);

extern void mid_can_busOffParaInit(void);
extern void CANAbortTransfer(uint8_t instance);


extern CAN_STATUS CANBusState(uint8_t instance);
extern void CANRxWakeUpMsg(uint8_t instance, uint32_t wmbIndex);




#endif

